<%@include file="header.jsp"%>
<c:set var="t" value="true" />
<form    action="SearchFacility" method=post>
	
	<table class="table table-striped">
	<tr>
			<td>
				<c:if test="${param['submit']==t}" >
					<input type="hidden" name="ins" value="true" />
				</c:if>
				<c:if test="${param['reset']==t}" >
					<input type="hidden" name="ins" value="false" />
				</c:if>
			</td>
		</tr>
		 <tr>
				<td><fmt:message key="setup.name" /></td>
				<td><input type="text" name="name" value="${param['name']}"
					size=15 maxlength=20></td>
			</tr>
			<tr>
				<td><fmt:message key="setup.description" /></td>
				<td><input type="text" name="description"
					value="${param['description']}" size=15 maxlength=20></td>
			</tr>
			<tr>
				<td><fmt:message key="setup.type" /></td>
				<td><select name="facilityType">
					<option value="meeting room"
						${ param['facilityType'] == "meeting room" ? 'selected="selected"' : ""  }>meeting room</option>
					<option value="class room"
						${ param['facilityType'] == "class room" ? 'selected="selected"' : ""  }>class room</option>
					<option value="discussion room"
						${ param['facilityType'] == "discussion room" ? 'selected="selected"' : ""  }>discussion room</option>
						<option value="multi purpose hall"
						${ param['facilityType'] == "multi purpose hall" ? 'selected="selected"' : ""  }>multi purpose hall</option>
					</select>
				</td>
			</tr>
			<tr>
				<td><fmt:message key="setup.capacity" /></td>
				<td><input type="text" name="capacity"
					value="${param['capacity']}" size=15 maxlength=20></td>
			</tr>
		<tr>
			<td colspan="2" style="text-align:center">
			<div class="btn-group">
			<input class="btn btn-primary" type="submit" value="Search">
			<input class="btn btn-primary" type="reset" value="Reset">
			</div>
			</td>
		</tr>			
		</table>
</form>

<table class="table table-striped">
	<tr>
		<th><fmt:message key="label.facility.name" /></th>
		<th><fmt:message key="label.facility.description" /></th>
		<th><fmt:message key="label.facility.type" /></th>
		<th><fmt:message key="label.facility.capacity" /></th>
	</tr>
	<c:forEach var="facility" items="${searchlist}" varStatus="status">
		<tr class="${status.index%2==0?'even':'odd'}">
			<td>${facility.facilityName}</td>
			<td>${facility.description}</td>
			<td>${facility.facilityType}</td>
			<td>${facility.capacity}</td>
		</tr>
	</c:forEach>
</table>
<%@include file="footer.jsp"%>